package com.weng.platform.apiManager.mock.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.weng.framework.core.exception.GlobalServiceException;
import com.weng.framework.core.model.ResponseData;
import com.weng.platform.apiManager.mock.entity.ApiMock;


/**
 * api的mock数据 服务接口
 *
 * @author wenghui
 * @date 2020-09-22 13:44:15
 *
 */  
public interface IApiMockService extends IService<ApiMock> {

    /*
     * 获取mock数据
     * @param [url, param]
     * @return
     */
    JSONObject getMockData(String url , String param);

	/**
	 * 新建单个
	 */
	public ApiMock add(ApiMock apiMock) throws GlobalServiceException;


	/**
	 * 更新
	 */
	public int update(ApiMock apiMock) throws GlobalServiceException;

	
	/**
	 * 删除
	 */
	public ResponseData removeByIds(String ids);

	/**
	 *  列表查询base
	 *  <p>
	 *      自定义列表查询：需实现定制化业务，组合查询，多分页查询等
	 */
	IPage<ApiMock> list(Integer pageNo, Integer pageSize);

}
